package com.ayf.payment.game.api.mapper.platform;

import com.ayf.payment.game.api.dto.platform.PaymentChannelDTO;
import com.ayf.payment.game.api.dto.platform.PaymentProductAndRateDTO;
import com.ayf.payment.game.api.dto.platform.PaymentProductDTO;
import com.ayf.payment.game.api.entity.platform.PaymentProduct;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface PaymentProductMapper extends Mapper<PaymentProduct> {

    void updateProductStatus(@Param("productId") int productId, @Param("productStatus") int productStatus);

    void updateSerialNumber(PaymentProductDTO paymentProductDTO);

    List<String> getPaymentProductBusinessCodeByGroup();

    PaymentProduct getFirstPaymentProductByBusinessCode(@Param("businessCode") String businessCode);

    PaymentProductAndRateDTO getPaymentProductAndRateDTO(@Param("paymentProductId") int paymentProductId);

    PaymentProductAndRateDTO getPaymentMerchantProductAndRateDTO(@Param("merchantId") int merchantId, @Param("paymentProductId") int paymentProductId);

    int updateStatusByChannelId(@Param("channelId") Integer channelId, @Param("productStatus") Integer productStatus);

    List<Integer> getProductIdsByChannelId(@Param("channelId") Integer channelId);

    PaymentChannelDTO getChannelStatusByProductId(@Param("productId") Integer productId);

    Integer countProductAndMerchant(@Param("merchantId")int merchantId,@Param("payCode") String payCode);
}